package cn.ycxy.lbl.pojo.search.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 二手交易帖子对应文档
 * </p>
 *
 * @author BaoL
 * @since 2023-03-15
 */
@Data
@Document(indexName = "cs_lbl_deal_discuss_posts")
@ApiModel(value="DealDiscussPosts对象", description="二手交易帖子对应搜索的文档")
public class DealDiscussPosts implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty(value = "自增主键")
    private Long id;

    @Field(type = FieldType.Integer)
    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @Field(type = FieldType.Text,
            analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    @ApiModelProperty(value = "内容")
    private String content;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "图片集合")
    private String imgUrls;

    @Field(type = FieldType.Integer)
    @ApiModelProperty(value = "帖子评论总数")
    private Integer commentCount;

    @Field(type = FieldType.Integer)
    @ApiModelProperty(value = "0-失物招领; 1-拼车服务; 2-校园风景; 3-二手交易")
    private Integer type;

    @Field(name = "amountOfOriginalPrice")
    @ApiModelProperty(value = "商品原总价")
    private BigDecimal amountOfOriginalPrice;

    @Field(name = "amountOfCurrentPrice")
    @ApiModelProperty(value = "商品现总价")
    private BigDecimal amountOfCurrentPrice;

    @Field(type = FieldType.Integer)
    @ApiModelProperty(value = "0-正常; 1-拉黑;")
    private Integer status;

    @Field(name = "createTime", type = FieldType.Long)
    @ApiModelProperty(value = "数据创建时间")
    private Long createTime;

    @Field(name = "updateTime", type = FieldType.Long)
    @ApiModelProperty(value = "数据最后更新时间")
    private Long updateTime;


}
